#include "myDialect/toyDialect.h"
#include "myDialect/toyOps.h"

#include "mlir/IR/OpImplementation.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/BuiltinAttributes.h"
#include "mlir/IR/DialectImplementation.h"
#include "mlir/Interfaces/FunctionImplementation.h"
#include "mlir/Transforms/InliningUtils.h"

#define GET_OP_CLASSES
#include "myDialect/toyOps.cpp.inc"

void mlir::toy::ConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, int input) {
    using namespace mlir;
    using namespace mlir::toy;
    auto dataType = odsBuilder.getI32Type();
    auto dataAttr = IntegerAttr::get(dataType, input);
    mlir::toy::ConstantOp::build(odsBuilder, odsState, dataType, dataAttr);
}   